package com.itjeffrey.autocode.websocket;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * websocket发送类
 * @From: Jeffrey
 * @Date: 2020/12/16
 */
@RestController
@RequestMapping(value="/websocket")
public class WebSocketController {

//    @Resource
//    private CodeGenerateService codeGenerateService;

//    @RequestMapping(value="/sendToOne", produces = {"application/json; charset=utf-8"},method=RequestMethod.POST)
//    public void sendToOne(HttpServletRequest request,String message){
//        //查询当前系统中的connection数量
//        Result result = codeGenerateService.getcurConnCount();
//        try {
//            WebSocketServer.sendInfo(JSON.toJSONString(result));
//        } catch (IOException e) {
//            e.printStackTrace();
//        }
//    }
}